﻿using System;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Entity;
using System.Linq.Expressions;
using System.Collections.Generic;
using System.Data.Objects;
using System.Data.Objects.DataClasses;

using PowerSys.Model;

namespace PowerSys.DataAccess
{
    public class XUserDA : AccessBase
    {
        protected override string EntitySetName
        {
            get { return Context.X_User.EntitySet.Name; }
        }

        public int BatchDelete(string name)
        {
            int count = 0;

            using (XBase xbase = new XBase())
            {
                count = xbase.X_User.Update(() => new X_User { ID = "大宝", Password = "x" }, x => x.ID.Contains("00000001"));
            }

            return count;
        }
    }
}
